<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="icon" href="/static/favicon.ico">

        <link href="https://fonts.googleapis.com/css?family=Inconsolata"
            rel="stylesheet">

        <link rel="stylesheet"
            href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
            integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
            crossorigin="anonymous">
        <link rel="stylesheet"
            href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/foundation.min.css">
        <link rel="stylesheet" type="text/css" href="/static/steadylearner.css"
            />
        <link rel="stylesheet" type="text/css" href="/static/normalize.css" />
        <link rel="stylesheet" type="text/css" href="/static/markdown.css" />
        <link rel="stylesheet" type="text/css" href="/static/modal.css" />

        <link rel="stylesheet" type="text/css" href="/static/index.css" />
        {% block title %}{% endblock %}
    </head>
    <body>
        <main>
            {% block content %}{% endblock %}
        </main>
    </body>
    {% block script %}
        <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
        <script
            src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.9/highlight.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
        <script>
            const before = document.querySelector(".markdown").innerHTML;
            options = {
                gfm: true, // Required for this project to work with GitHub
                tables: true,
                breaks: false,
                pedantic: false,
                sanitize: false, // true if you don't use html in markdown files
            };
            marked.setOptions(options);
            document.querySelector(".markdown").innerHTML = marked(before);
            // Use dompurify or others in production if you want
            // https://github.com/markedjs/marked#warning--marked-does-not-sanitize-the-output-html-please-use-a-sanitize-library-like-dompurify-recommended-sanitize-html-or-insane-on-the-output-html-
        </script>
    {% endblock %}
</html>
